<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<div><h:form id="form_profil">
	<h:panelGrid columns="2">
		<h:outputText value="#{msg.input_nom}" />
		<h:inputText id="input_nom" value="#{clientBean.nom}" required="true"
			requiredMessage="#{msg.input_nom_required}" maxlength="35" size="35" />

		<h:outputText value="#{msg.input_prenom}" />
		<h:inputText id="input_prenom" value="#{clientBean.prenom}"
			required="true" requiredMessage="#{msg.input_prenom_required}"
			maxlength="20" size="20" />

		<h:outputText value="#{msg.input_mail}" />
		<h:inputText id="input_mail" value="#{clientBean.mail}"
			required="true" requiredMessage="#{msg.input_mail_required}"
			maxlength="30" size="30" disabled="#{clientBean.connected}">
			<f:validator validatorId="mailValidation" />
		</h:inputText>

		<h:outputText value="#{msg.input_motdepasse}" />
		<h:inputSecret value="#{clientBean.motdepasse}" required="true"
			maxlength="10" size="10"
			requiredMessage="#{msg.input_motdepasse_required}" />

		<h:outputText value="#{msg.input_motdepasseconfirm}" />
		<h:inputSecret value="#{clientBean.motdepasseconfirm}" required="true"
			maxlength="10" size="10"
			requiredMessage="#{msg.input_motdepasse_required}" />

		<h:outputText value="Adresse postale" style="font-weight: bold;" />
		<br />

		<h:outputText value="#{msg.input_adresse}" />
		<h:inputText id="input_adresse"
			value="#{clientBean.adresseFacturation.adresse}" required="true"
			requiredMessage="#{msg.input_adresse_required}" maxlength="255"
			size="35" />

		<h:outputText value="#{msg.input_cp}" />
		<h:inputText id="input_cp" value="#{clientBean.adresseFacturation.cp}"
			required="true" requiredMessage="#{msg.input_cp_required}"
			maxlength="10" size="10" converterMessage="#{msg.error_cpmalformed}">
			<f:validator validatorId="cpValidation" />
		</h:inputText>

		<h:outputText value="#{msg.input_ville}" />
		<h:inputText id="input_ville"
			value="#{clientBean.adresseFacturation.ville}" required="true"
			requiredMessage="#{msg.input_ville_required}" maxlength="20"
			size="20" />

		<h:outputText value="#{msg.input_telephone}" />
		<h:inputText id="input_telephone"
			value="#{clientBean.adresseFacturation.telephone}" required="true"
			requiredMessage="#{msg.input_telephone_required}" maxlength="10"
			size="10" converterMessage="#{msg.error_telephonemalformed}">
			<f:validator validatorId="telephoneValidation" />
		</h:inputText>

		<f:facet name="footer">
			<h:commandLink action="#{clientBean.register}" value="Valider" />
		</f:facet>
	</h:panelGrid>

</h:form></div>
